#include "mainwindow.h"
#include "ui_mainwindow.h"
#include "pipeline.c"

char *music[1];


MainWindow::MainWindow(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::MainWindow)
{
    music[0] = "mu";
    music[1] = "mu";
    ui->setupUi(this);
    QString sPath ="/";
    dirModel = new QFileSystemModel(this);
    dirModel->setRootPath(sPath);
    ui->treeView->setModel(dirModel);
}

MainWindow::~MainWindow()
{
    delete ui;
}

void MainWindow::on_pushButton_clicked()
{
    QString mu = dirModel->filePath(ui->treeView->currentIndex());
    QByteArray ba = mu.toLocal8Bit();
    char *c_str2 = ba.data();
    pipeline(2,music,c_str2);
}

